

package jetbrains.buildServer.server.rest.model.changeLog;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import jetbrains.buildServer.controllers.buildType.tabs.GraphBuild;
import jetbrains.buildServer.messages.Status;

@XmlType(name = "changeLogGraphBuildVertex")
public class ChangeLogGraphBuildVertex extends ChangeLogGraphVertex<GraphBuild> {
  public ChangeLogGraphBuildVertex(GraphBuild vertex) {
    super(vertex);
  }

  @XmlAttribute(name = "status")
  public String getStatus() {
    Status status = getVertex().getBuild().getBuildId() < 0 ? Status.UNKNOWN : getVertex().getBuild().getBuildStatus();
    return status.getText().toLowerCase();
  }
}